package com.hivekion;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

import java.time.LocalDate;
import java.time.LocalTime;

@SpringBootApplication
@MapperScan({"com.hivekion.*.mapper", "com.gitee.sunchenbin.mybatis.actable.dao"})
@ComponentScan(basePackages = {"com.gitee.sunchenbin.mybatis.actable.manager.*", "com.hivekion.*"})
public class DemoApplication extends SpringBootServletInitializer {

      private static Logger log = LoggerFactory.getLogger(DemoApplication.class);

      public static void main(String[] args) {
	    SpringApplication.run(DemoApplication.class, args);
	    log.info(
		    "《《《《《《 JAVAFRAME started up successfully at {} {} 》》》》》》",
		    LocalDate.now(),
		    LocalTime.now());
      }

      @Override // 为了打包springboot项目
      protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
	    return builder.sources(this.getClass());
      }
}
